﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="tananyag.aspx.cs" Inherits="NEMProjectWebApp.Pages.Diak.tananyagok" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table>
        <tr>
            <td>

                <asp:Label ID="TananyagokLabel" runat="server" Text="Tananyagok:" Width="100px"></asp:Label>

            </td>
            <td>
                <asp:Button ID="LetoltButton" runat="server" Text="Tananyag letöltése" 
                    onclick="LetoltButton_Click" />

            </td>
        </tr>
        <tr>
            <td colspan="2">

                <asp:ListBox ID="TananyagokListBox" runat="server" Height="300px" Width="100%" 
                    AutoPostBack="True" DataSourceID="SqlDataSourceTananyag" DataTextField="anyag" 
                    DataValueField="Tan_ID" 
                    onselectedindexchanged="TananyagokListBox_SelectedIndexChanged"></asp:ListBox>

                <asp:SqlDataSource ID="SqlDataSourceTananyag" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:masterConnectionString %>" 
                    SelectCommand="SELECT [Tan_ID], [FileName] as anyag FROM [Tananyag]">
                </asp:SqlDataSource>

            </td>
        </tr>
    </table>
</asp:Content>
